package com.open.party.cloud.view.home.juBao

import android.os.Bundle
import android.view.View
import cn.android.x.parent.AppTitleBaseActivity
import com.open.party.cloud.R
import com.open.party.cloud.viewModel.BizViewModel
import com.sinothk.android.utils.XUtils
import kotlinx.android.synthetic.main.activity_12380_ru_xu_zhi.*

class JuBao12380RuXuZhiActivity : AppTitleBaseActivity(), View.OnClickListener {

    var viewModel: BizViewModel? = null
    var area = ""
    override fun getLayoutResId(): Int = R.layout.activity_12380_ru_xu_zhi

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setViewTitle("举报须知")
        area = intent.getStringExtra("area") as String

        viewModel = BizViewModel()

        submitBtn01.setOnClickListener(this)
        submitBtn02.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        val isRead = isReadRb.isChecked
        if (!isRead) {
            XUtils.toast().show("请先同意上述条款")
            return
        }

        when (v) {
            submitBtn01 -> {
                XUtils.intent().openActivity(this, JuBao12380JuBaoClassActivity::class.java)
                    .putIntExtra("class1", JuBao12380JuBaoClassActivity.JB_CLass_Ge_Ren)
                    .putStringExtra("area", area)
                    .start()
            }
            submitBtn02 -> {
                XUtils.intent().openActivity(this, JuBao12380JuBaoClassActivity::class.java)
                    .putIntExtra("class1", JuBao12380JuBaoClassActivity.JB_CLass_Dan_Wei)
                    .putStringExtra("area", area)
                    .start()
            }
        }
    }
}